package com.iptv.grape.event.factory;

import com.iptv.grape.event.JSRequest;
import com.iptv.grape.event.imp.*;
import com.iptv.grape.event.proc.IWebViewMessageProc;

public class BuildEventProc {

    public static IWebViewMessageProc Build(JSRequest jsRequest){
        IWebViewMessageProc proc = null;
        switch (jsRequest.getId()){
            case "1":
                // 进入直播全屏处理器
                proc = new IntoFullScreenProc();
                break;
            case "9":
                proc = new VodWindow();
                break;
            case "0":
                proc = new LiveWindow();
                break;
            case "8":
                proc = new SendUserInfo();
                break;
            case "3":
                proc = new CloseLiveWindow();
                break;
            case "getPlayRecordByID":
                proc = new PlayRecordByIDProc();
                break;
            case "getChannelRecords":
                proc = new GetChannelRecords();
                break;
            case "intoChannel":
                proc = new IntoChannel();
                break;
            case "setHotChannelList":
                proc = new InitHotChannelList();
                break;
            case "playRecords":
                proc = new GetPlayRecords();
                break;
            case "addResourcesInBookmark":
                proc = new AddResourcesInBookmark();
                break;
            case "getBookmarkList":
                proc = new GetBookmarkList();
                break;
            case "delResourcesInBookmark":
                proc = new DelResourcesInBookmark();
                break;
            case "killWindow":
                proc = new KillWindowProc();
                break;
            case "setEpgVer":
                proc = new SetEpgVerProc();
                break;
            case "openApk":
                proc = new GotoApk();
                break;
            case "openPage":
                proc = new OpenPage();
                break;
            case "showControlPanel":
                proc = new ShowControlPanel();
                break;
            default:
                proc = new DefWebViewProc();
                break;
        }
        return proc;
    }
}
